package com.xiaobai.easyexcel;

import com.alibaba.excel.EasyExcelFactory;
import com.xiaobai.easyexcel.dto.RuleFareDTO;
import com.xiaobai.easyexcel.listener.CommonReadListener;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/")
@RestController
public class MainController {

    String fileName = "D:\\360MoveData\\Users\\figo\\Desktop\\卡罗拉.xlsx";

    @RequestMapping("/read")
    public Object read() {
        EasyExcelFactory.read(fileName, RuleFareDTO.class, new CommonReadListener<RuleFareDTO>()).sheet().doRead();
        return null;
    }
}
